package cn.wangsy.zhidao.p20170328;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateFormatTest {

	public static void main(String[] args) {

		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		System.out.println(dateFormat.format(new Date()));
		
		dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		System.out.println(dateFormat.format(new Date()));
		
		dateFormat = new SimpleDateFormat("yyyy/MM/dd");
		System.out.println(dateFormat.format(new Date()));
		
	}

}
